# Session Management Commands

Commands related to the session lifecycle: clearing, deleting the current session, resuming, exporting, copying, compaction, and branching.

Back to: [Command Panel Guide](./09.0.Command%20Panel%20Guide.md)

---

## `/clear`

Clear current chat context.

- **Function**: Clear current conversation history and start fresh conversation
- **Use Cases**: When conversation context is too long or need to switch topics
- **Example**: Simply type `/clear` and press Enter

## `/del-session`

Delete the current session and clear the screen.

- **Function**: Delete the current session record and clear the current chat screen
- **Use Cases**: When the current session no longer needs to be kept, or when you want to fully remove the current session history
- **Behavior**:
  - Only deletes the current session; other historical sessions are not deleted
  - If there is no current session to delete, Snow CLI shows a prompt
  - After successful deletion, the screen is cleared and Snow CLI returns to a new empty session state
- **Example**: Type `/del-session` to delete the current session

## `/resume`

Resume historical session.

- **Function**: Open session selection panel to select and resume previously saved conversations
- **Use Cases**: Need to continue unfinished conversation or view history
- **Example**: Type `/resume` to view all saved sessions

## `/export`

Export conversation records.

- **Function**: Export current conversation as text file
- **Use Cases**: Need to save conversation content for documentation or sharing
- **Example**: Type `/export` to automatically save to project directory

## `/copy-last`

Copy the last AI response.

- **Function**: Copy the most recent AI assistant message in the current session to the system clipboard
- **Use Cases**: Quickly reuse the previous answer in documentation, commit messages, tickets, or other chats
- **Notes**:
  - Only the latest non-sub-agent AI assistant message is copied
  - If no AI response exists yet, or the last response is empty, Snow CLI shows a prompt instead
- **Example**: Type `/copy-last` to copy the last AI response

## `/compact`

Compress conversation history.

- **Function**: Use AI to compress conversation history, reducing token usage
- **Use Cases**: Conversation is too long but don't want to clear, need to retain key information
- **Example**: Type `/compact` to start compression

## `/branch`

Fork the current session.

- **Function**: Fork the current conversation into an independent new session
- **Parameters**: Optional branch name
- **Use Cases**: Try different approaches based on the same context without affecting the current conversation
- **Examples**:
  - `/branch` - Fork the current session
  - `/branch my-experiment` - Fork and name it my-experiment

## `/cut`

Interrupt the AI response and immediately send a new message.

- **Function**: While the AI is responding, immediately interrupt the current AI response and queue the user's message to be sent
- **Parameters**: `<message>` (required) — The message to send to the AI after interrupting
- **Behavior**:
  - Unlike `ESC` interrupt, `/cut` silently interrupts the AI response without showing a "user interrupted" marker
  - The AI's incomplete response is preserved in the conversation history
  - The user message is automatically sent after the interrupt completes — no need to wait for the current turn to finish
  - Interrupts immediately even if the AI is in the thinking phase
- **Use Cases**: When you notice the AI is going in the wrong direction, no need to wait for the current turn to finish — just interrupt and send a correction
- **Examples**:
  - `/cut stop, don't do that — use a different approach`
  - `/cut wait, I need to give you more context`

## `/pause`

Pause the AI loop.

- **Function**: While the AI is processing (streaming, executing tools, or running multi-round tool-call loops), pause the AI loop at the next round boundary
- **Availability**: Only available during AI processing — type `/pause` in the command panel while AI is working
- **Behavior**:
  - The AI finishes the current round (streaming + tool execution), then blocks at the start of the next loop iteration
  - The pause has no timeout — it remains paused indefinitely until you resume or interrupt
  - While paused, the loading indicator shows a "Paused" status and the elapsed timer / stream-delay color change are frozen
  - Press `ESC` at any time during pause to fully interrupt the AI (same as a normal ESC interrupt)
- **Use Cases**:
  - Temporarily halt the AI loop to review intermediate results before it continues
  - Step away while the AI is in a long tool-call chain without losing the conversation state
  - Inspect file changes made by tools before the AI proceeds to the next round

## `/continue`

Resume the AI loop after a pause.

- **Function**: Unblock the AI loop that was paused by `/pause` so it proceeds to the next round immediately
- **Availability**: Only available while the AI loop is paused — type `/continue` in the command panel to resume
- **Behavior**:
  - The AI loop resumes from exactly where it was paused — no context is lost
  - The elapsed timer and stream-delay color change resume from where they were frozen
  - If the AI was not paused, `/continue` shows a "not paused" message and does nothing
- **Use Cases**:
  - Resume the AI loop after reviewing intermediate results
  - Continue a long-running task after stepping away
